package com.itheima.mapper;

import com.itheima.dto.RecordsDto;
import com.itheima.pojo.Records;
import com.itheima.pojo.SetmealDishes;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SetmealMapper {
    List<Records> page(@Param("name") String name,
                       @Param("start") Integer start,
                       @Param("pageSize") Integer pageSize,
                    @Param("type") Integer Type
    );

    int save(Records records);

    int batchInsertSetmealDishes(@Param("list") List<SetmealDishes> newsetmealDishes);

    Records getById(@Param("id") String id);

    List<SetmealDishes> getmealDishesById(@Param("id") String id);

    int delete(@Param("ids") List<String> ids);

    int sell(@Param("ids") List<String> ids, @Param("status") int status);

    int update(RecordsDto recordsDto);

    int countsetmealdishesById(@Param("setmealId") String id);

    int removesetmealdishesById(@Param("setmealId") String id);

    List<Records> getByIds(List<String> ids);

    long count();

    List<Records> clientgetList(@Param("categorId") String categoryId,@Param("status") String status);
}
